//@json
function main(tbl){
	tbl.put("table","sys_job")
	dao.update(tbl)
	let Jobs=com.jse.job.Jobs;
	if(tbl.status==0){
		Jobs.remove(tbl.id);
		return {code:0,msg:"任务已停止"}
	}else{
		let job=dao.fetch("sys_job",Cnd.where("id","=",tbl.id))
		Jobs.add(tbl.id,new com.jse.job.Task(job),job.cron);
		return {code:0,msg:"任务已启用"}
	}
	
}